var tew=document.getElementById('cont')
function getTime(){     	//获取时间
    var today=new Date();
    var m= today.getMonth()+1;
    var days = ["星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六"];
    var s=today.getFullYear()+"年"
        +m+"月"+today.getDate()
        +"日\t"+today.getHours()+":"+today.getMinutes()
        +":"+today.getSeconds()+"\t"+days[today.getDay()];
    tew.innerHTML=s;//将时间显示在div内
}
getTime();
//设置一秒更新
setInterval(getTime,1000);
